<?php
/**
 * Created by PhpStorm.
 * User: 96572
 * Date: 2017/5/1
 * Time: 17:40
 */
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
$this->title = '修改菜单';
$menus = ArrayHelper::map($menus,'menu_id','menu_label');
$menus = ArrayHelper::merge([0=>'最上级分类'],$menus);
?>
<div class="user-create">

    <h1><?= Html::encode($this->title) ?></h1>

    <div class="user-form">

        <?php $form = ActiveForm::begin(['enableAjaxValidation' => true]); ?>

        <?= $form->field($menu, 'menu_label')->textInput() ?>

        <?= $form->field($menu, 'menu_icon')->textInput() ?>

        <?= $form->field($menu, 'menu_module_id')->textInput() ?>

        <?= $form->field($menu, 'menu_controller_id')->textInput() ?>

        <?= $form->field($menu, 'menu_action_id')->textInput() ?>

        <?= $form->field($menu, 'menu_is_visible')->dropDownList([0=>'不可见',1=>'可见']) ?>

        <?= $form->field($menu, 'menu_is_lowest')->dropDownList([0=>'不是',1=>'是'],['disabled'=>'disabled']) ?>

        <?= $form->field($menu, 'menu_parent_id')->dropDownList($menus) ?>

        <div class="form-group">
            <?= Html::submitButton('更新', ['class' => 'btn btn-primary']) ?>
        </div>

        <?php ActiveForm::end(); ?>

    </div>

</div>